package com.trinhrae.shooting.moduleGeneral.service;

import org.springframework.kafka.core.KafkaTemplate;
import com.alibaba.fastjson.JSONObject;
import org.springframework.stereotype.Service;

/**
 * @Author: TrinhRae
 * @Package: com.trinhrae.shooting.moduleGeneral.service
 * @Project: shooting
 * @Date: 2025/9/17 14:41
 */
@Service
public class KafkaProducerService {
    private final KafkaTemplate<String, String> kafkaTemplate;

    public KafkaProducerService(KafkaTemplate kafkaTemplate) {
        this.kafkaTemplate = kafkaTemplate;
    }

    /**
     * 发送验证码
     *
     * @param topic
     * @param infoContent
     */
    public void sendVerifyCode(String topic, String infoContent) {
        kafkaTemplate.send(topic, infoContent);
    }

}
